package com.info.zhiduoduo.repository.mapper.crowdsource;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.entity.crowdsource.UploadFileTaskRecord;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author tianyonghong
 * @create 2023/9/25
 */
public interface UploadFileTaskRecordMapper extends BaseMapper<UploadFileTaskRecord> {

    @Select(" select * " +
            " from zdd_upload_file_task_record " +
            " where compid = #{compid}" +
            " AND IF(#{fileType} = 0, 1=1, file_type = #{fileType})" +
            " AND IF(#{state} = 0, 1=1, state = #{state})" +
            " ORDER BY create_time DESC ")
    List<UploadFileTaskRecord> selectList(Integer compid,int fileType,int state);

}
